<%@ page contentType="text/html;charset=UTF-8"%>
<%@ page import="com.ejoysoft.etable.business.Game,
				 com.ejoysoft.common.Constants,
				 com.ejoysoft.util.ParamUtil,
				 java.io.File"%>
<%@ include file="../include/jsp/head.jsp"%>
<%
	Game obj=new Game(globa,false);
    String strUrl="game_list.jsp";
    String strFilePath = application.getRealPath("") + "/game/images/";
    if(action.equals(Constants.DELETE_STR)){
    	String[] aryStrId = ParamUtil.getStrArray(request, "strId");
    	for (int i = 0; i < aryStrId.length; i++) {
    		Game obj0 = obj.show(" where strId='" + aryStrId[i] + "'");
    		if (obj0.getStrSmallImage().length() > 0) {
    			File f = new File(strFilePath + obj0.getStrSmallImage());
        		f.delete();
    		}
    		if (obj0.getStrLargeImage().length() > 0) {
        		File f = new File(strFilePath + obj0.getStrLargeImage());
        		f.delete();
        	}
    		File f = new File(strFilePath + obj0.getStrFile());
    		f.delete();
	    	obj.delete("where strId ='"+aryStrId[i]+"'");
    	}
    	globa.dispatch(true, strUrl);
        //关闭数据库连接对象
        globa.closeCon();
	}
%>